package helpers;

import java.util.ArrayList;
import java.util.List;

public class RoleHelper {
	public static List<String> getRoleMenu(int role) {
		List<String> roles = new ArrayList<String>();
		switch (role) {
			//Sales
			case 1:
				roles = getRoleForSale(); 
				break;
	
			case 2:
				roles = getRoleForDirectSale();
				break;
			
			case 3:
				roles = getRoleForDelivery();
				break;
				
			//Kho
			case 4:	
				roles = getRoleForStore();
				break;
			
				//Kho
			case 5:	
				roles = getRoleForCoordinator();
				break;
				
			case 6:
				roles = getRoleForAccounting();
				break;
			
			case 7:
				roles = getRoleForMarketing();
				break;
				
			case 8:
				roles = getRoleForCEO();
				break;
				
			//Admin
			case 9:
				roles = getRoleForAdmin();
				break;
				
			default:
				break;
		}
		
		return roles;
	}
	
	/**
	 * Role menu for sale
	 */
	private static List<String> getRoleForSale() {
		List<String> roles = new ArrayList<String>();
		
		roles.add("all");
		
		return roles;
	}
	
	/**
	 * Role menu for dDirect sale
	 */
	private static List<String> getRoleForDirectSale() {
		List<String> roles = new ArrayList<String>();
		
		roles.add("all");
		
		return roles;
	}
	
	/**
	 * Role menu for delivery
	 */
	private static List<String> getRoleForDelivery() {
		List<String> roles = new ArrayList<String>();
		
		roles.add("all");
		
		return roles;
	}
	
	/**
	 * Role menu for store
	 */
	private static List<String> getRoleForStore() {
		List<String> roles = new ArrayList<String>();
		roles.add("manager-store"); //Quản lý kho
		roles.add("store-item-add"); //Thêm sản phẩm
		roles.add("store-item-list"); //Danh sách sản phẩm
		return roles;
	}
	
	/**
	 * Role menu for Coordinator
	 */
	private static List<String> getRoleForCoordinator() {
		List<String> roles = new ArrayList<String>();
		
		roles.add("all");
		
		return roles;
	}
	
	/**
	 * Role menu for Accounting
	 */
	private static List<String> getRoleForAccounting() {
		List<String> roles = new ArrayList<String>();
		//roles.add("all");
		roles.add("manager-accounting");
		return roles;
	}
	
	/**
	 * Role menu for Marketing
	 */
	private static List<String> getRoleForMarketing() {
		List<String> roles = new ArrayList<String>();
		
		roles.add("all");
		
		return roles;
	}
	
	/**
	 * Role menu for CEO
	 */
	private static List<String> getRoleForCEO() {
		List<String> roles = new ArrayList<String>();
		
		roles.add("all");
		
		return roles;
	}
	
	/**
	 * Role menu for admin
	 */
	private static List<String> getRoleForAdmin() {
		List<String> roles = new ArrayList<String>();
		roles.add("all");
		return roles;
	}
}
